Dimmer detection

ABSTRACT

In at least one embodiment, a lighting system receives an input signal, such as a supply voltage, that can be affected by a dimmer. The supply voltage can be affected by a dimmer when, for example, a dimmer phase cut (i.e. chopped) the supply voltage. A dimmer detection system of the lighting system determines if a dimmer is affecting the supply voltage. In at least one embodiment, the dimmer detection system also determines a type of the dimmer, such as detecting if the dimmer is a leading edge or trailing edge dimmer. In at least one embodiment, the dimmer detection system provides dimmer type data to one or more other circuits such as a switching power converter controller. The one or more other circuits utilize the dimmer type data to affect their operation.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of co-pending application Ser. No. 13/077,483, filed Mar. 31, 2011, which claims the benefit under 35 U.S.C. §119(e) and 37 C.F.R. §1.78 of U.S. Provisional Application No. 61/413,164, filed Nov. 12, 2010, and entitled “Digital Dimmer Detection.” Both of these applications are incorporated herein by reference in their entireties.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates in general to the field of electronics, and more specifically to a method and system for dimmer detection.

2. Description of the Related Art

Electronic systems utilize dimmers to modify output power delivered to a load. For example, in a lighting system, dimmers provide an input signal to a lighting system, and the load includes one or more light sources such as one or more light emitting diodes (LEDs) or one or more fluorescent light sources. Dimmers can also be used to modify power delivered to other types of loads, such as one or more motors or one or more portable power sources. The input signal represents a dimming level that causes the lighting system to adjust power delivered to a lamp, and, thus, depending on the dimming level, increase or decrease the brightness of the lamp. Many different types of dimmers exist. In general, dimmers use a digital or analog coded dimming signal that indicates a desired dimming level. For example, some analog based dimmers utilize a triode for alternating current (“triac”) device to modulate a phase angle of each cycle of an alternating current (“AC”) supply voltage. “Modulating the phase angle” of the supply voltage is also commonly referred to as “chopping” or “phase cutting” the supply voltage. Phase cutting the supply voltage causes the voltage supplied to a lighting system to rapidly turn “ON” and “OFF” thereby controlling the average power delivered to the lighting system. As subsequently explained in more detail, both leading edge and trailing edge dimmers are used to modulate the supply voltage waveform and, thus, modulating the delivered power or root mean square (“RMS”) voltage delivered to a circuit, such as a switching power converter.

FIG. 1 depicts a lighting system 100 that includes a leading edge dimmer 102. FIG. 2 depicts exemplary voltage graphs 200 associated with the lighting system 100. Referring to FIGS. 1 and 2, the lighting system 100 receives an AC supply voltage V_(SUPPLY) from voltage supply 104. The supply voltage V_(SUPPLY), indicated by voltage waveform 202, is, for example, a nominally 60 Hz/110 V line voltage in the United States of America or a nominally 50 Hz/220 V line voltage in Europe. A leading edge dimmer phase cuts leading edges, such as leading edges 204 and 206, of each half cycle of supply voltage V_(SUPPLY). Since each half cycle of supply voltage V_(SUPPLY) is 180 degrees of the supply voltage V_(SUPPLY), a leading edge dimmer phase cuts the supply voltage V_(SUPPLY) at an angle greater than 0 degrees and less than 180 degrees. Generally, the voltage phase cutting range of a leading edge dimmer 102 is 10 degrees to 170 degrees. The leading edge dimmer 102 can be any type of leading edge dimmer such as a triac-based leading edge dimmer available from Lutron Electronics, Inc. of Coopersberg, Pa. (“Lutron”). A triac-based leading edge dimmer is described in the Background section of U.S. patent application Ser. No. 12/858,164, entitled Dimmer Output Emulation, filed on Aug. 17, 2010, and inventor John L. Melanson.

Ideally, by modulating the phase angle of the dimmer output voltage V_(Φ) _(—) _(DIM), the leading edge dimmer 102 effectively turns the lamp 106 OFF during time period T_(OFF) and ON during time period T_(ON) for each half cycle of the supply voltage V_(SUPPLY). Thus, ideally, the dimmer 102 effectively controls the average power supplied to the lamp 106 in accordance with the dimmer output voltage V_(Φ) _(—) _(DIM). However, in many circumstances, the leading edge dimmer 102 does not operate ideally. For example, when the lamp 106 draws a small amount of current i_(DIM), the current i_(DIM) can prematurely drop below a holding current value HC before the supply voltage V_(SUPPLY) reaches approximately zero volts. When the current i_(DIM) prematurely drops below the holding current value HC, a triac-based leading edge dimmer 102 prematurely disengages (i.e. turns OFF and stops conducting), and the dimmer voltage V_(Φ) _(—) _(DIM) will prematurely drop to zero. When the dimmer voltage V_(Φ) _(—) _(DIM) prematurely drops to zero, the dimmer voltage V_(Φ) _(—) _(DIM) does not reflect the intended dimming value as set by the resistance value of variable resistor 114. Additionally, the triac 106 of leading edge dimmer 102 can reengage (conductive) and disengage (non-conductive) repeatedly during a half-cycle of supply voltage V_(SUPPLY) when the current i_(DIM) is below of near the holding current value HC.

FIG. 3 depicts a lighting system 300 that includes a trailing edge dimmer 302. FIG. 4 depicts exemplary voltage graph 400 associated with the lighting system 300. Trailing edge dimmer 102 generates trailing edges, such as trailing edges 404 and 406, of each half cycle of supply voltage V_(SUPPLY) to effectively turn the lamp 106 OFF during time period T_(OFF) and ON during time period T_(ON) for each half cycle of the supply voltage V_(SUPPLY). Trailing edge dimmer 302 also chops the supply voltage V_(SUPPLY) at an angle less than 180 degrees and greater than 0 degrees. The phase cut range of a trailing edge dimmer 102 is, for example, 170 degrees to 10 degrees, and is generally between 150 degrees and 10 degrees. The trailing edge dimmer 102 can be any type of trailing edge dimmer such as field effect transistor based dimmer available from Lutron.

Thus, leading edge, trailing edge, and leading and trailing edge type dimmers are useful to reduce an average amount of power delivered to a load. However, at least in general, dimmers do not directly communicate their dimmer type to other circuits that could benefit from knowing the dimmer type.

SUMMARY OF THE INVENTION

In one embodiment of the present invention, a method includes receiving an input signal representing a supply voltage signal. The method further includes detecting a dimmer affecting the supply voltage signal and generating a dimmer detection signal representing detection of the dimmer.

In another embodiment of the present invention, an apparatus includes a dimmer detection system to receive an input signal representing a supply voltage signal, detect a dimmer affecting the supply voltage signal, and generate a dimmer detection signal representing detection of the dimmer.

In a further embodiment of the present invention, an apparatus includes a power converter system to convert a supply voltage signal into an output voltage. The apparatus further includes a controller, coupled to the power converter system to control the power converter system, wherein the controller includes a dimmer detection system. The dimmer detection system includes one or more input terminals to receive an input signal representing a supply voltage signal and a dimmer detector to detect if a dimmer is affecting the supply voltage signal and generate a dimmer detection signal representing detection of the dimmer. The dimmer detection system further includes a dimmer type detector to determine a type of the dimmer affecting the supply voltage and generate a dimmer type detection signal.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention may be better understood, and its numerous objects, features and advantages made apparent to those skilled in the art by referencing the accompanying drawings. The use of the same reference number throughout the several figures designates a like or similar element.

FIG. 1 (labeled prior art) depicts a lighting system that includes a leading edge dimmer.

FIG. 2 (labeled prior art) depicts exemplary voltage graphs associated with the lighting system of FIG. 1.

FIG. 3 (labeled prior art) depicts a lighting system that includes a trailing edge dimmer.

FIG. 4 (labeled prior art) depicts exemplary voltage graphs associated with the lighting system of FIG. 3.

FIG. 5 depicts a lighting system that includes a dimmer detection system.

FIG. 6 depicts one embodiment of the lighting system of FIG. 5.

FIG. 7 depicts two exemplary waveforms of a supply voltage for the lighting system of FIG. 6.

FIG. 8 depicts an embodiment of a dimmer detection system of the lighting system of FIG. 6.

FIG. 9 depicts exemplary leading edge phase cut lighting system signals associated with the dimmer detection system of FIG. 8.

FIG. 10 depicts a state diagram for detecting a 110 V+/−20%, 60 Hz dimmer type by the state machine of the dimmer detection system of FIG. 8.

FIG. 11 depicts exemplary trailing edge phase cut lighting system signals associated with the dimmer detection system of FIG. 8.

FIG. 12 depicts a state diagram for detecting a dimmer type for a 220 V+/−20%, 50 Hz supply voltage by the state machine of the dimmer detection system of FIG. 8.

FIG. 13 depicts a digital dimmer detection system of the lighting system of FIG. 6.

FIG. 14 depicts an embodiment of the digital dimmer detection system of FIG. 13.

FIG. 15 depicts an exemplary dimmer detection type state diagram for the digital dimmer detection system of FIG. 14.

FIG. 16 depicts exemplary signals associated with trailing edge type detection mode and correlated states of the state machine in FIG. 14.

FIG. 17 depicts an embodiment of a dimmer type detector of the digital dimmer detection system of FIG. 14.

FIG. 18 depicts a dimmer type validator.

FIG. 19 depicts an embodiment of a dimmer type detector of the digital dimmer detection system of FIG. 14.

DETAILED DESCRIPTION

Typically, dimmers do not directly provide data to any device indicating their dimmer type. For example, a leading edge dimmer does not directly provide data indicating that the dimmer is a leading edge dimmer, a trailing edge dimmer does not directly provide data indicating the dimmer is a trailing edge dimmer, and so on. However, it has been determined that, in at least one embodiment, knowing a type of the dimmer assists other circuits in operating more efficiently. It has been determined that, in at least one embodiment, knowing a type of the dimmer assists other circuits in operating more effectively. For example, if a controller in a lighting system knows the type of a dimmer, the controller can keep a dimmer connected and reduce or eliminate flicker of a light source.

In at least one embodiment, a lighting system receives an input signal, such as a supply voltage, that can be affected by a dimmer. The supply voltage can be affected by a dimmer when, for example, a dimmer phase cut (i.e. chopped) the supply voltage. A dimmer detection system of the lighting system determines if a dimmer is affecting the supply voltage. In at least one embodiment, the lighting system asserts a signal, such as a holding or “glue” signal, when the supply voltage to the lighting system drops below a predetermined threshold value to prevent multiple engagement and disengagement cycles of a triac-based dimmer during a single half cycle of the supply voltage. In at least one embodiment, the “glue” signal is a current supplied by, for example, a dimmer emulator circuit, that is sufficient to prevent a dimmer, such as a triac-based dimmer, from misfiring during a dimmer phase cut of the supply voltage. In at least one embodiment, the threshold value is set close to zero (0) volts, so that assertion of the glue signal for at least a minimum threshold amount of time indicates that the supply voltage has been phase cut. In at least one embodiment, the dimmer detection system determines that a dimmer is affecting the supply voltage if the glue signal has been asserted for the minimum threshold amount of time.

In at least one embodiment, the dimmer detection system also determines a type of the dimmer, such as detecting if the dimmer is a leading edge or trailing edge dimmer. The dimmer detection system monitors a supply voltage either directly or via a signal representing the supply voltage. In at least one embodiment, the dimmer detection system determines if a slope of the supply voltage exceeds a minimum threshold value. The minimum threshold value can be, for example, either a minimum positive value or a minimum negative value. The minimum threshold value can be set to indicate an abrupt change in the supply voltage. An abrupt change in the supply voltage indicates the presence of an edge in a phase cut supply voltage. A slope of the supply voltage exceeding a minimum, positive threshold value indicates a leading edge dimmer, and a slope of the supply voltage exceeding a minimum, negative threshold value indicates a trailing edge dimmer. In at least one embodiment, the dimmer detection system determines the slope of the supply voltage by determining an amount of time elapsed between when the supply voltage exceeds two voltage thresholds. If the elapsed time is less than a minimum threshold amount of time, the slope of the supply voltage indicates a phase cut. In at least one embodiment, the dimmer detection system determines the slope of the supply voltage by determining an amount of supply voltage change during a fixed amount of time. The fixed amount of time is set sufficiently low to allow the dimmer detection system to detect a change in the supply voltage uniquely associated with an abrupt change, such as a phase cut, in the supply voltage.

The dimmer detection system can be configured so that if a dimmer is detected and a leading edge dimmer is not detected, then the dimmer detection system determines by default that the dimmer is a trailing edge dimmer. Likewise, the dimmer detection system can be configured so that if a dimmer is detected and a trailing edge dimmer is not detected, then the dimmer detection system determines by default that the dimmer is a leading edge dimmer.

In at least one embodiment, abrupt changes in the supply voltage can occur for reasons other than phase cutting by a dimmer, such as transient excursions of the supply voltage from a nominal supply voltage value. However, transients in the supply voltage are generally anomalies. Thus, transients are generally non-periodic and non-recurring within a time period encompassing a relatively short number of voltage supply cycles, such as eight or less cycles. Thus, to accurately detect a dimmer in an environment that includes a possibility of voltage transients, in at least one embodiment, the dimmer detection system validates a determination of the dimmer type by validating a consistent dimmer type determination over multiple cycles of the supply voltage. Thus, the dimmer detection system can determine both leading edge and trailing edge dimmers and validate the accuracy of the dimmer type determination even in the presence of non-periodic transients.

In at least one embodiment, the dimmer detection system provides dimmer type data to one or more other circuits such as a switching power converter controller. The one or more other circuits utilize the dimmer type data to affect their operation. For example, in at least one embodiment, a controller controls the switching power converter. If the controller assumes that a leading edge dimmer is a triac-based dimmer, then the controller asserts the previously discussed glue signal each time the supply voltage drops below a minimum threshold value. However, if the dimmer detection system determines that the dimmer is a trailing edge dimmer, then, in at least one embodiment, the controller assumes that the dimmer is not triac-based, and, thus, can disable the glue signal and save energy. In at least one embodiment, the controller also asserts the glue signal upon detection of trailing edge dimmer each time the supply voltage drops below a minimum threshold value. Additionally, if the dimmer detection system determines that no dimmer is affecting the supply voltage, then the controller can also disable the glue signal and save energy.

FIG. 5 depicts a lighting system 500 that includes a dimmer detection system 502 that, as subsequently explained in more detail, detects dimmer 504 when dimmer 504 is affecting the supply voltage V_(SUPPLY). In at least one embodiment, the dimmer detection system 502 also detects the type of dimmer 504. The lighting system 500 also includes a controller 506 to control power conversion by the power converter system 508. In at least one embodiment, power converter system 508 includes a buck-type, boost-type, buck-boost, or Cúk-type switching power converter. Dimmer 504 phase cuts the supply voltage V_(SUPPLY) provided by voltage supply 104. “V_(Φ) _(—) _(DIM)” and “i_(DIM)” respectively represent the output voltage and current of dimmer 504. In at least one embodiment, the dimmer detection system 502 monitors the current i_(DIM) and/or voltage V_(Φ) _(—) _(DIM) and determines either the slope of current i_(DIM) or the slope of voltage V_(Φ) _(—) _(DIM). Since a phase cut of supply voltage V_(SUPPLY) indicates an abrupt change in the differential of the current i_(DIM) and voltage V_(Φ) _(—) _(DIM) over time, the slope at the leading edge of the voltage V_(SUPPLY) at the phase cut indicates a leading edge dimmer type dimmer 504, and a slope at the trailing edge of the voltage V_(SUPPLY) at the phase cut indicates a trailing edge dimmer. In at least one embodiment, the dimmer detection system 502 assumes that dimmer 504 is either a leading edge dimmer or a trailing edge dimmer. Thus, in at least one embodiment, the dimmer detection system 502 can attempt to detect either a leading edge or a trailing edge of the supply voltage V_(SUPPLY) or current i_(DIM) but does not have to positively detect both a leading edge and a trailing edge of supply voltage V_(SUPPLY). If dimmer 504 is present and dimmer detection system 502 attempts to detect a leading edge of supply voltage V_(SUPPLY) but does not identify the leading edge, dimmer detection system 502 assumes by default that dimmer 504 is a trailing edge type dimmer. If dimmer detection system 502 attempts to detect a trailing edge of supply voltage V_(SUPPLY) and does not identify a trailing edge, dimmer detection system 502 assumes by default that dimmer 504 is a leading edge type dimmer. In at least one embodiment, dimmer detection system 502 attempts to positively identify both a leading edge and trailing edge of the voltage supply V_(SUPPLY) and/or the current i_(DIM) to identify a dimmer type that phase cuts both a leading and a trailing edge of voltage supply V_(SUPPLY). In at least some embodiments and as subsequently explained in more detail, the dimmer detection system 502 determines the slope either over a fixed period of time or over a fixed voltage range or current change during a fixed period of time.

In at least one embodiment, the dimmer detection system 502 receives the supply voltage V_(SUPPLY) and/or the current i_(DIM) and, thus, monitors the supply voltage V_(SUPPLY) and/or current i_(DIM) directly. In at least one embodiment, the dimmer detection system 502 receives a representation of the supply voltage V_(SUPPLY) and/or the current i_(DIM), such as a scaled version, and, thus, monitors the supply voltage V_(SUPPLY) and/or current i_(DIM) indirectly.

Referring to controller 506, the particular type and design of controller 506 is a matter of design choice. An exemplary controller 506 is available from Cirrus Logic, Inc. having offices in Austin, Tex., USA. An exemplary controller and dimmer emulator combination is described in U.S. patent application Ser. No. 12/858,164, entitled and referred to herein as Dimmer Output Emulation, filed on Aug. 17, 2010, and inventor John L. Melanson, which is incorporated herein by reference.

In at least one embodiment, dimmer detection system 502 is a separate component from controller 506. In at least one embodiment, dimmer detection system 502 is a module of controller 506. Implementation of the dimmer detection system 502 is a matter of design choice. The dimmer detection system 502 can be implemented, for example, as an integrated circuit, analog and/or digital discrete components, and/or in a configurable circuit, such as a field programmable gate array device. Additionally, functionality of the dimmer detection system 502 can be implemented using software or firmware code that is executable by a processor of dimmer detection system 502 or controller 506.

Referring to power converter system 508, the particular type and design of power converter system 508 is a matter of design choice. In at least one embodiment, power converter 514 is a switching power converter, such as a boost-type, buck-type, boost-buck-type, or Cúk-type switching power converter. In at least one embodiment, power converter system 508 provides power factor correction and regulates the output voltage V_(OUT) and/or current delivered to load 510. U.S. Pat. No. 7,719,246, entitled “Power Control System Using a Nonlinear Delta-Sigma Modulator with Nonlinear Power Conversion Process Modeling”, filed Dec. 31, 2007, inventor John L. Melanson describes exemplary power converters and controllers. The power converter system 508 delivers power to load 510 through output voltage V_(OUT) and output current i_(OUT). Load 510 can be any type of load, such as any type of light source such as one or more light emitting diodes (LEDs) or one or more fluorescent light sources, one or more motors, one or more portable power sources, or other type of load.

In at least one embodiment, the dimmer detection system 502 provides dimmer detection type data DDT to controller 506, and controller 506 utilizes the dimmer type data to affect the operation of controller 506. For example, in at least one embodiment, if the controller 506 assumes that a leading edge type dimmer 504 is triac-based, then the controller 504 asserts signal GS each time the supply voltage V_(SUPPLY) drops below a minimum threshold value. However, in at least one embodiment, if the dimmer detection system 502 determines that the dimmer 504 is a trailing edge type, then the controller 506 assumes that the dimmer 504 is not triac-based, and, thus, can disable the signal GS and save energy. In at least one embodiment, if the dimmer detection system 502 determines that the dimmer 504 is a trailing edge type, then the controller 506 continues to assert the signal GS to maintain consistent operation of the dimmer 504. Additionally, if the dimmer detection system 502 determines that no dimmer is affecting the supply voltage, then the controller 506 can also disable the signal GS and save energy. In at least one embodiment, the signal GS is a glue signal that prevents a triac (not shown) of a triac-based type dimmer 504 from repeatedly engaging and disengaging during a single half cycle of supply voltage V_(SUPPLY). An exemplary discussion of the glue signal and generation of a glue signal is described below with reference to FIG. 6 and in Dimmer Output Emulation.

FIG. 6 depicts a lighting system 600 that is one embodiment of lighting system 500. Lighting system 600 includes dimmer detection system 602 to detect a type of dimmer 504. Dimmer detection system 602 represents one embodiment of dimmer detection system 502. Controller 604 represents one embodiment of controller 506. In at least one embodiment, the controller 604 includes a dimmer emulator as described in Dimmer Output Emulation that generates the glue signal i_(GLUE). “i_(GLUE)” is one embodiment of the glue signal GS. The glue signal i_(GLUE) draws a glue current from power converter interface circuit 606 during a phase cut by dimmer 504. In at least one embodiment, the “glue” current is a current supplied by, for example, a dimmer emulator circuit, that is sufficient to prevent a dimmer, such as a triac-based dimmer, from misfiring during a dimmer phase cut of the supply voltage. Power converter system 605 represents one embodiment of power converter system 508. Power converter system 605 includes power converter interface circuit 606 and power converter 607. In at least one embodiment, power converter 607 is a buck-type, boost-type, buck-boost, or Cúk-type switching power converter.

FIG. 7 depicts two exemplary waveforms of supply voltage V_(SUPPLY). Referring to FIGS. 6 and 7, full-bridge, diode rectifier 608 rectifies the output voltage V_(DIM) of dimmer 504 to provide a rectified supply voltage V_(Φ) _(—) _(R) to power converter interface circuit 606. Dimmer Output Emulation describes an exemplary power converter interface circuit. The rectified supply voltage V_(Φ) _(—) _(R) waveform 702 represents an exemplary trailing edge, phase cut, rectified supply V_(Φ) _(—) _(R). In waveform 702, the rectified supply voltage V_(Φ) _(—) _(R) is phase cut at time t₀ and time t₃ to generate a trailing edge phase cut. The rectified supply voltage V_(Φ) _(—) _(R) waveform 704 represents an exemplary leading edge, phase cut, rectified supply V_(Φ) _(—) _(R). In waveform 704, the rectified supply voltage V_(Φ) _(—) _(R) is phase cut at time t₇ and time t₉ to generate a leading edge phase cut. Controller 604 includes a dimmer emulator 610. The dimmer emulator 610 is described in Dimmer Output Emulation. Although dimmer emulator 610 is depicted as part of controller 604, dimmer emulator 610 can also, for example, be implemented as a component separate from controller 604.

During the phase cut of the rectified supply voltage V_(Φ) _(—) _(R) in waveform 702, dimmer emulator 604 generates glue signal i_(GLUE) during respective times t₁ to t₂ and t₄ to t₅. During the phase cut of the rectified supply voltage V_(Φ) _(—) _(R) in waveform 704, dimmer emulator 604 generates glue signal i_(GLUE) during respective times t₆ to t₇ and t₈ to t₉. The glue signal i_(GLUE) is asserted, as, for example, described in Dimmer Output Emulation, once the rectified supply voltage V_(Φ) _(—) _(R) drops below a predetermined threshold value, such as approximately zero (0) volts. The dimmer emulator 610 generates the glue signal i_(GLUE) during a phase cut to hold the rectified supply voltage V_(Φ) _(—) _(R) low to prevent a triac-based dimmer from misfiring. Thus, generation of the glue signal i_(GLUE) for a minimum threshold of time indicates the presence of a dimmer affecting the supply voltage V_(SUPPLY). However, although it is clear from the depiction of waveforms 702 and 704 which waveform has a trailing edge phase cut and which waveform has a leading edge phase cut, in at least one embodiment, the glue signal i_(GLUE) itself does not provide enough information to controller 604 for controller 604 to identify the type of dimmer 504.

Dimmer detection system 602 monitors the glue signal i_(GLUE). In at least one embodiment, if the glue signal is asserted, such as between times t₁ and t₂, the dimmer detection system 602 determines that a dimmer is affecting the supply voltage V_(SUPPLY). Once the dimmer detection system 602 determines that a dimmer is affecting the supply voltage V_(SUPPLY), the dimmer detection system 602 monitors the rectified supply voltage V_(Φ) _(—) _(R) to detect a type of dimmer 504. In at least one embodiment, the dimmer detection system 602 attempts to determine if dimmer 504 is a trailing edge dimmer. In at least one embodiment, the dimmer detection system 602 determines a slope of the rectified supply voltage V_(Φ) _(—) _(R). If the slope exceeds a maximum value, an abrupt change in the rectified supply voltage V_(Φ) _(—) _(R) is indicated, such as the abrupt change in the rectified supply voltage V_(Φ) _(—) _(R) between times t₀ and t₁ and between times t₃ and t₄. In at least one embodiment, the dimmer detection system 602 determines if a slope of the rectified supply voltage V_(Φ) _(—) _(R) exceeds a minimum threshold value. The minimum threshold value can be, for example, either a minimum positive value or a minimum negative value. A slope of the rectified supply voltage V_(Φ) _(—) _(R) exceeding a minimum, positive threshold value indicates a leading edge dimmer 504, and a slope of the rectified supply voltage V_(Φ) _(—) _(R) exceeding a minimum, negative threshold value indicates a trailing edge dimmer 504.

In at least one embodiment, the dimmer detection system 602 determines the slope of the rectified supply voltage V_(Φ) _(—) _(R) by determining an amount of time elapsed between when the rectified supply voltage V_(Φ) _(—) _(R) exceeds two voltage thresholds. If the elapsed time is less than a minimum threshold amount of time, the slope of the rectified supply voltage V_(Φ) _(—) _(R) indicates a phase cut. In at least one embodiment, the dimmer detection system 602 detects the slope of the rectified supply voltage V_(Φ) _(—) _(R) by determining an amount of voltage change during a fixed amount of time. The fixed amount of time is set sufficiently low to allow the dimmer detection system 602 to detect a change in the supply voltage uniquely associated with an abrupt change, such as a phase cut, in the supply voltage. In at least one embodiment, it is highly improbable that dimmer detection system 602 will detect phase cuts in the rectified supply voltage V_(Φ) _(—) _(R) over multiple cycles unless dimmer 504 is phase cutting the rectified supply voltage V_(Φ) _(—) _(R). Thus, to validate a type of dimmer, the dimmer detection system 602 determines the slope of the rectified supply voltage V_(Φ) _(—) _(R) multiple times within a single cycle and/or within multiple cycles of the rectified supply voltage V_(Φ) _(—) _(R). If the dimmer detection system 602 consistently detects a phase cut of the rectified supply voltage V_(Φ) _(—) _(R), then dimmer detection system 602 validates a type of dimmer 504.

The particular time thresholds and voltage thresholds used by dimmer detection system 602 to determine a phase cut in the rectified supply voltage V_(Φ) _(—) _(R) are a matter of design choice. In at least one embodiment, the minimum voltage thresholds are set to detect an abrupt change after the rectified supply voltage V_(Φ) _(—) _(R) exceeds a minimum phase cut angle. In at least one embodiment, the time thresholds are set low enough to distinguish between an uncut slope of the rectified supply voltage V_(Φ) _(—) _(R) and a phase cut slope of the rectified supply voltage V_(Φ) _(—) _(R). The slope of the rectified supply voltage V_(Φ) _(—) _(R) is very high at very low phase cut angles and at very high phase cut angles. Thus, as described in more detail below, in at least one embodiment, the dimmer detection system 602 determines a slope of the rectified supply voltage V_(Φ) _(—) _(R) during a period of time within a minimum and maximum phase angle range.

Dimmer detection system 602 provides data DDT and DIMMER_MODE to controller 604. In at least one embodiment, the DIMMER_MODE output signal is a dimmer detection signal that informs controller 604 of the detection of a dimmer 504, and the dimmer detection type signal DDT informs controller 604 of the type of dimmer 504. In at least one embodiment, controller 604 operates more efficiently when dimmer detection system 602 detects the type of dimmer 504. For example, in at least one embodiment, if the controller 604 assumes that a leading edge type dimmer 504 is triac-based, then the controller 604 asserts the glue signal i_(GLUE) each time the rectified supply voltage V_(Φ) _(—) _(R) drops below a minimum threshold value. However, if the dimmer detection system 602 determines that the dimmer 504 is a trailing edge type, then the controller 604 assumes that the dimmer 504 is not triac-based, but, in at least one embodiment, continues to assert the glue signal i_(GLUE) between times t₁ and t2 for trailing edge waveform 702. Additionally, if the dimmer detection system 602 determines that no dimmer is affecting the supply voltage, then the controller 604 can also disable the glue signal and save energy.

FIG. 8 depicts a dimmer detection system 800, which represents one embodiment of dimmer detection system 602. FIG. 9 depicts exemplary leading edge phase cut lighting system signals 900 associated with dimmer detection system 800. In at least one embodiment, dimmer detection system 800 operates as a state machine. FIG. 10 depicts a state diagram 1000 for detecting a 110 V+/−20%, 60 Hz dimmer type by the state machine of dimmer detection system 800.

Referring to FIGS. 8, 9, and 10, the dimmer detection system 800 includes a dimmer detector 802. Dimmer detector 802 determines whether a dimmer is phase cutting the rectified supply voltage V_(Φ) _(—) _(R) by determining if the glue signal i_(GLUE) is asserted for at least a minimum dimmer detection threshold time T_(TH) _(—) _(GLUE). In at least one embodiment, the dimmer detection system 800 detects a dimmer and determines a dimmer type for phase cut angles between 10 degrees and 170 degrees, which equates to approximately the rectified supply voltage V_(Φ) _(—) _(R) equal to 28V on the rising and falling portions of the rectified supply voltage V_(Φ) _(—) _(R). In at least one embodiment, the minimum dimmer detection threshold time T_(TH) _(—) _(GLUE) is 506 μsec. “506 μsec” is the approximate duration of 10 degrees of a 110 Hz, rectified supply voltage V_(Φ) _(—) _(R) signal. In at least one embodiment, the value of T_(TH) _(—) _(GLUE) is a matter of design choice and is, for example, programmable.

As previously described and as shown in FIG. 9, the glue signal i_(GLUE) is asserted (i.e. is a logical one) when the rectified supply voltage V_(Φ) _(—) _(R) drops below a predetermined voltage threshold V_(GS) _(—) _(TH), such as approximately 0 V. Timer 804 receives the glue signal i_(GLUE) and generates an output signal T_(GLUE) representing a determination of a duration of the assertion of the glue signal i_(GLUE). Comparator 806 compares the value of output signal T_(GLUE) with the minimum dimmer detection threshold time T_(TH) _(—) _(GLUE) and generates a dimmer detection output signal DIMMER_MODE. The output signal DIMMER_MODE is a logical 0 if T_(GLUE) is less than T_(TH) _(—) _(GLUE), which indicates that dimmer 504 is inactive and, thus, has not phase cut the rectified supply voltage V_(Φ) _(—) _(R). The output signal DIMMER_MODE is a logical 1 if T_(GLUE) is greater than T_(TH) _(—) _(GLUE), which indicates that dimmer 504 is actively phase cutting the supply voltage V_(SUPPLY) and, thus, has phase cut the rectified supply voltage V_(Φ) _(—) _(R).

For example, in FIG. 9, dimmer 504 phase cuts the rectified supply voltage V_(Φ) _(—) _(R) at times t₀ and t₇ and at an angle between 10° and 170°. The glue signal i_(GLUE) is asserted from time t₀ to t₁ and again from time t₇ to t₈ when the rectified supply voltage V_(Φ) _(—) _(R) is approximately 0 V. The time between times t₀ and t₁ and between times t₇ and t₈ is greater than T_(TH) _(—) _(GLUE), and, thus, the output signal DIMMER_MODE is a logical 1. Thus, the dimmer detector 802 detects an active dimmer 504, i.e. dimmer 504 is actively phase cutting the rectified supply voltage V_(Φ) _(—) _(R).

Referring to FIGS. 8, 9, and 10, the dimmer detection system 800 also includes a dimmer type detector 808. In at least one embodiment, the dimmer type detector 808 is activated when the dimmer detection output signal DIMMER_MODE is a logical 1, which indicates that dimmer detector 802 has detected an active dimmer 504. Thus, if the dimmer detection output signal DIMMER_MODE is a logical 0, in at least one embodiment, dimmer detection system 800 does not operate dimmer type detector 808, thus, saving power.

During operation, the dimmer type detector 808 determines if a slope of a trailing edge of the rectified supply voltage V_(Φ) _(—) _(R) exceeds a predetermined threshold value by measuring an amount of time between a predetermined change in the current i_(R), which corresponds to changes in the rectified supply voltage V_(Φ) _(—) _(R). If the amount of time is less than a threshold time T_(TH) _(—) _(i), then the slope of the rectified supply voltage V_(Φ) _(—) _(R) indicates an abrupt change consistent with a leading edge phase cut of the rectified supply voltage V_(Φ) _(—) _(R). Upon detection of the leading edge phase cut of the rectified supply voltage V_(Φ) _(—) _(R), the dimmer type detector 808 generates a dimmer type output signal DT indicating a leading edge type dimmer 504. In at least one embodiment, since dimmer detector 802 has already detected the presence of an active dimmer 504 when dimmer type detector 808 is operating, if the slope of the rectified supply voltage V_(Φ) _(—) _(R) does not indicate a leading edge phase cut, the dimmer type output signal DT of dimmer type detector 808 indicates that dimmer 504 is a trailing edge type dimmer. Although the embodiment of dimmer type detector 808 in FIG. 8 utilizes current comparators 810 and 820 and first and second threshold currents i_(TH) _(—) ₁ and i_(TH) _(—) ₂ as references, well-known voltage comparators can be substituted for one or both of current comparators 810 using one or both of the first and second voltage thresholds of V_(Φ) _(—) _(R) _(—) _(TH1) and V_(Φ) _(—) _(R) _(—) _(TH2) of FIG. 9, which correspond to the first and second threshold currents i_(TH) _(—) ₁ and i_(TH) _(—) ₂. In at least one embodiment, dimmer detection system 800 optionally includes two analog-to-digital converters (ADCs) 830 and 832 that respectively convert (i_(R)−i_(TH) _(—) ₁) and (i_(R)−i_(TH) _(—) ₂) into digital input signals for respective comparators 810 and 820. When the dimmer detection system 800 includes ADCs 830 and 832, comparators 810 and 820 are implemented using well-known digital circuitry to generate respective digital output signals D_(i1) and D_(i2).

In at least one embodiment, dimmer detection system 800 operates dimmer type detector 808 in accordance with state diagram 1000 when the root mean square (RMS) voltage of the rectified supply voltage V_(Φ) _(—) _(R) is 110V+/−20%. The state diagram 1000 begins with state 1002. In state 1002, the dimmer detection system 800 waits until the glue signal i_(GLUE) is deasserted. In FIG. 9, the glue signal i_(GLUE) is asserted at time t₀ when the rectified supply voltage V_(Φ) _(—) _(R) is approximately 0V and is deasserted at time t₁ when the rectified supply voltage V_(Φ) _(—) _(R) rises above approximately 0V. Once the glue signal i_(GLUE) is deasserted at time t₁, dimmer detection system 800 proceeds to state 1004. In state 1004, the dimmer detection system 800 waits until the rectified supply voltage V_(Φ) _(—) _(R) reaches the first threshold voltage V_(Φ) _(—) _(R) _(—) _(TH1).

At time t₂, the rectified supply voltage V_(Φ) _(—) _(R) reaches the first threshold voltage V_(Φ) _(—) _(R) _(—) _(TH1), which corresponds to the first threshold current i_(TH) _(—) ₁. The dimmer type detector 808 utilizes a current comparator 810 to determine when the rectified supply voltage V_(Φ) _(—) _(R) reaches first threshold voltage V_(Φ) _(—) _(R) _(—) _(TH1). The dimmer type detector 808 monitors current i_(R) by allowing current i_(R) to flow through resistor R1 and into node 812. Current source 814 generates a first threshold current i_(TH) _(—) ₁, and the first threshold current i_(TH) _(—) ₁ also flows into node 812. If current i_(R) is less than the first threshold current i_(TH) _(—) ₁, the output signal D_(i1) of current comparator 810 is a logical 0, which indicates that the rectified supply voltage V_(Φ) _(—) _(R) is less than the first threshold voltage V_(Φ) _(—) _(R) _(—) _(TH1). When current i_(R) is greater than the first threshold current i_(TH) _(—) ₁, the output signal D_(i1) of current comparator 810 is a logical 1, which occurs at time t₂ and indicates that the rectified supply voltage V_(Φ) _(—) _(R) is greater than the first threshold voltage V_(Φ) _(—) _(R) _(—) _(TH1). The “set” input of counter 816 receives the output signal D_(i1). When the output signal D_(i1) is a logical 1, counter 816 begins counting and increments at the frequency of a clock signal CLK. The frequency of clock signal CLK is set to allow counter 816 to measure an amount of time ΔT₂₋₁ between when current i_(R) is greater than threshold currents i_(TH) _(—) ₁ and i_(TH) _(—) ₂ when the rectified supply voltage V_(Φ) _(—) _(R) has a leading edge phase cut for phase angles between 10° and 170°. The particular values of a minimum time ΔT₂₋₁ and a frequency f_(CLK) are matters of design choice. In at least one embodiment, the minimum time ΔT₂₋₁ is 27 μsec, and the frequency f_(CLK) of the clock signal CLK is at least 2/ΔT₂₋₁, i.e. f_(CLK)≧74.1 kHz.

After the first threshold voltage V_(Φ) _(—) _(R) _(—) _(TH1) is reached, the dimmer detection system 800 then proceeds to state 1006 and waits until the current i_(R) is greater than the second threshold voltage V_(Φ) _(—) _(R) _(—) _(TH2), which corresponds to second threshold current i_(TH) _(—) ₂. Current source 816 generates a second threshold current i_(TH) _(—) ₂, and the current i_(R) and the second threshold current i_(TH) _(—) ₂ flow into node 818. If current i_(R) is less than the second threshold current i_(TH) _(—) ₂, the output signal D_(i2) of current comparator 820 is a logical 0, which indicates that the rectified supply voltage V_(Φ) _(—) _(R) is less than the second threshold voltage V_(Φ) _(—) _(R) _(—) _(TH2). When current i_(R) is greater than the second threshold current i_(TH) _(—) ₂, the output signal D_(i2) of current comparator 810 is a logical 1, which occurs at time t₃ and indicates that the rectified supply voltage V_(Φ) _(—) _(R) is greater than the second threshold voltage V_(Φ) _(—) _(R) _(—) _(TH2). The “reset” input of counter 816 receives the output signal D_(i2). When the output signal D_(i2) is a logical 1, counter 816 is reset. The output value ΔT₂₋₁ of counter 816 represents the count value of counter 816 when counter 816 is reset. Thus, the counter output value ΔT₂₋₁ equals the elapsed time between times t₂ and t₃, i.e. ΔT₂₋₁=t₃−t₂.

Comparator 822 compares the counter output value ΔT₂₋₁ with a predetermined time threshold T_(TH) _(—) ₁. If the counter output value ΔT₂₋₁ is less than the predetermined time threshold T_(TH) _(—) ₁, the detector type output DT of comparator 822 is a logical 1, which indicates a leading edge type dimmer 504. If the counter output value ΔT₂₋₁ is greater than the predetermined time threshold T_(TH) _(—) ₁, the detector type output DT of comparator 822 is a logical 0, which represents a trailing edge type dimmer 504 or no dimmer. Since the quantity (V_(Φ) _(—) _(R) _(—) _(TH1)−V_(Φ) _(—) _(R) _(—) _(TH2))/ΔT₂₋₁ represents the approximate slope of the rectified supply voltage V_(Φ) _(—) _(R) between times t₂ and t₃, in at least one embodiment, the dimmer detection system 800 determines the slope of the rectified supply voltage V_(Φ) _(—) _(R) when the rectified supply voltage V_(Φ) _(—) _(R) crosses the first and second voltage thresholds V_(Φ) _(—) _(R/R1) _(—) _(TH1) and V_(Φ) _(—) _(R/R1) _(—) _(TH2).

The resistance value R1, the current values of the first and second threshold currents i_(TH) _(—) ₁ and i_(TH) _(—) ₂, and the value the time threshold T_(TH) _(—) ₁ are set so that the detector type output DT is a logical 0 in the absence of a leading edge phase cut of the rectified supply voltage V_(Φ) _(—) _(R), and the detector type output DT is a logical 1 when dimmer 504 is a leading edge dimmer type. In at least one embodiment, the first threshold current i_(TH) _(—) ₁ is set to correspond to a value of current i_(R) such that i_(R)/R1 equals 10.3V, the second threshold current i_(TH) _(—) ₂ is set to correspond to a value of current i_(R) such that i_(R)/R1 equals 15.0V, and the time threshold T_(TH) _(—) ₁ is 27 μsec. These values allow detection of a dimmer type having a minimum phase cut angle of 10°, a maximum phase cut angle of 170° for a 110V, 60 Hz supply voltage V_(SUPPLY). The values of current i_(R), current thresholds i_(TH) _(—) ₁ and i_(TH) _(—) ₂, and resistance value R1 are matters of design choice. In at least one embodiment, for a 110 Vrms rectified supply voltage V_(Φ) _(—) _(R), the resistance value R1 to conduct a maximum current of 100 μA is 1.2 Mohms, the first threshold current i_(TH) _(—) ₁ occurs at rectified supply voltage V_(Φ) _(—) _(R) equal 10 V and equals 8 μA, and the second threshold current i_(TH) _(—) ₂ occurs at rectified supply voltage V_(Φ) _(—) _(R) equal 20 V and equals 16 μA.

Once the second threshold voltage V_(Φ) _(—) _(R) _(—) _(TH2) is reached, dimmer detection system 800 proceeds to state 1008 and waits for the assertion of the glue signal i_(GLUE), which occurs at time t₇. The output signals D_(i1) and D_(i2) both return to logical 0 at respective times t₅ and t₆ when current i_(R) falls below respective threshold currents i_(TH) _(—) ₂ and i_(TH) _(—) ₁.

FIG. 11 depicts exemplary trailing edge phase cut lighting system signals 1100 associated with dimmer detection system 800. Referring to FIGS. 8, 10, and 11, the dimmer detection system 800 operates identically as described with the leading edge phase cut lighting system signals 900. However, for a trailing edge phase cut, the rectified supply voltage V_(Φ) _(—) _(R) 1102, the times between t₀ and t₁ and t₂ and t₃ when the rectified supply voltage V_(Φ) _(—) _(R) initially crosses respective thresholds V_(Φ) _(—) _(R) _(—) _(TH1) and V_(Φ) _(—) _(R) _(—) _(TH2), are each greater than the time threshold T_(TH) _(—) ₁. Accordingly, for the trailing edge phase cut lighting system signals 1100, the detector type output DT of comparator 822 is a logical 0. In at least one embodiment, the same operations occur in dimmer detection system 800 with no phase cut of the rectified supply voltage V_(Φ) _(—) _(R), and the DIMMER_MODE and DDT signals indicate an absence of a dimmer.

While the glue signal i_(GLUE) is asserted, dimmer detection logic 824 determines the type of dimmer 504 from the logical states of dimmer detection signal DIMMER_MODE and the dimmer type signal DT in accordance with Table 1 (“X” indicates a “do not care state”):

TABLE 1 DIMMER_MODE DT DIMMER TYPE 0 X NO DIMMER 1 1 LEADING EDGE 1 0 TRAILING EDGE

In at least one embodiment, if a type of dimmer 504 is not detected, the dimmer detection system 800 and dimmer emulator 610 (FIG. 6) continues to positively identify a dimmer type and does not determine a dimmer type by default. In this embodiment, the controller 604 (FIG. 6) continues to operate as if a dimmer 504 is present until a dimmer type is positively identified.

In at least one embodiment, the dimmer detection logic 824 generates a determined dimmer type output signal DDT to indicate the determined dimmer type from Table 1. In at least one embodiment, transients in the rectified supply voltage V_(Φ) _(—) _(R) and missed phase cut cycles by dimmer 504 in the rectified supply voltage V_(Φ) _(—) _(R) can result in an erroneous determination by the dimmer detection system 800 of the type of dimmer 504. Accordingly, in at least one other embodiment, the dimmer detection logic 824 validates that the determined dimmer type is accurate by counting a number of times that a particular dimmer type is determined and determines a new dimmer type for output signal DDT only when a particular dimmer type is detected for a predetermined number of times.

For example, in at least one embodiment, to validate the detected dimmer type, dimmer detection logic 824 includes dimmer type counter 826. The dimmer type counter counts a number of times that each dimmer type of Table 1 is detected and sends a dimmer type count DTC signal to dimmer validation logic 828. Dimmer validation logic 828 determines when a particular dimmer type has been selected for a predetermined number of times. The number of times is a matter of design choice and depends on a number that accounts for an anticipated number of possible errors in the dimmer type detection over a predetermined number of cycles of the rectified supply voltage V_(Φ) _(—) _(R). In at least one embodiment, the predetermined number of times to validate a dimmer type is seven (7). In at least one embodiment, once a particular dimmer type has been determined for the predetermined number of times, the counters in dimmer type counter 826 are reset and the validation process is restarted.

For example, over the course of 10 consecutive cycles of the rectified supply voltage V_(Φ) _(—) _(R), the dimmer detection system 800 detects no dimmer 2 times, a trailing edge dimmer 2 times, and a leading edge dimmer 6 times. After the 11^(th) cycle of the rectified supply voltage V_(Φ) _(—) _(R), the dimmer detection system 800 detects a leading edge dimmer for the seventh time. Then, dimmer validation logic 828 generates the dimmer detection type signal DDT to indicate that the dimmer 504 is a leading edge type dimmer. The dimmer validation logic 828 then resets the counters of dimmer type counter 826 and does not change the status of the dimmer detection type signal DDT until either no dimmer or a trailing edge type dimmer 504 is determined seven times before a leading edge type dimmer is again detected seven times.

FIG. 12 depicts a state diagram 1200 for detecting a dimmer type for a 220 V+/−20%, 50 Hz supply voltage by the state machine of dimmer detection system 800. The difference between state diagram 1000 (FIG. 10) and state diagram 1200 is the introduction of delay 1202 between states 1002 and 1004. In at least one embodiment, for a 220V supply voltage, the deassertion of the glue signal i_(GLUE) can cause temporary fluctuations 1204, such as ringing, in the rectified supply voltage V_(Φ) _(—) _(R). Thus, state diagram 1200 includes a delay T_(DELAY) that precedes state 1004 so that dimmer detection system 800 begins operation in state 1004 after the delay T_(DELAY) in state 1202 to avoid determination of a false dimmer detection type due to the fluctuations 1204 in rectified supply voltage V_(Φ) _(—) _(R) causing state changes in output signals D_(i1) and/or D_(i2). The particular value of delay T_(DELAY) is a matter of design choice, and, in at least one embodiment, is at least as long as a settling time of the fluctuations 1204.

FIG. 13 depicts a digital dimmer detection system 1300, which represents one embodiment of dimmer detection system 602. Referring to FIGS. 6 and 13, the digital dimmer detection system 1300 processes multiple input signals to determine: (A) if a dimmer, such as dimmer 504 is active and, thus, affecting the supply voltage V_(SUPPLY) and (B) a type of dimmer 504 if dimmer 504 is active. Table 2 contains an identification of the input and output signals of digital dimmer detection system 1300 and an exemplary description:

TABLE 2 SIGNAL DESCRIPTION RESET Resets the output signals to a predetermined state. CLK Operating clock signal. V_(Φ)_R The rectified supply voltage V_(Φ)_R. VOLTAGE_MODE A binary signal indicating the voltage of rectified supply voltage V_(Φ)_R: 110V = logical 0 220V = logical 1 GLUE SIGNAL The glue signal i_(GLUE) that asserts when the i_(GLUE) rectified supply voltage V_(Φ)_R is approximately 0V to provide a holding current for dimmer 504 if dimmer 504 is a triac-based dimmer. OTP BITS “One Time Programmable” bits. The OTP bits allows the digital dimmer detection system 1300 to, for example, store data such as various thresholds in a memory in digital dimmer detection system 1300. DIMMER_MODE Indicates the presence or absence of a dimmer: No dimmer detected = logical 0 Dimmer detected = logical 1 DDT “Dimmer Detection Type”. Indicates a type of dimmer 504: Leading Edge type = logical 0 Trailing Edge type = logical 1 EXPOSE_LINE Engages and disengages circuitry such as dimmer emulator 610 based on whether a dimmer is present and the dimmer type.

In at least one embodiment, if dimmer 504 is actively phase cutting the supply voltage V_(SUPPLY), the digital dimmer detection system 1300 generates the dimmer detection signal DIMMER_MODE to indicate whether a dimmer is affecting the supply voltage V_(SUPPLY). In at least one embodiment, if the digital dimmer detection system 1300 detects a dimmer, the dimmer detection signal DIMMER_MODE is a logical 1, and, if the digital dimmer detection system 1300 does not detect a dimmer, the dimmer detection signal DIMMER_MODE is a logical 0. To determine the value of the dimmer detection signal DIMMER_MODE, the digital dimmer detection system 1300 processes the glue signal i_(GLUE). If the time GS_(TIME) that the glue signal i_(GLUE) is asserted is greater than a glue signal threshold time GS_(TIME) _(—) _(TH), then an active dimmer 504 is detected, and digital dimmer detection system 1300 sets the dimmer detection signal DIMMER_MODE to a logical 1. If the time GS_(TIME) that the glue signal i_(GLUE) is asserted is less than a glue signal threshold time GS_(TIME) _(—) _(TH), then no dimmer is detected, and digital dimmer detection system 1300 sets the dimmer detection signal DIMMER_MODE to a logical 0.

The digital dimmer detection system 1300 processes the rectified supply voltage V_(Φ) _(—) _(R) to determine a value of the dimmer detection type signal DDT to indicate to controller 604 a type of dimmer 504. The VOLTAGE_MODE signal indicates to the digital dimmer detection system 1300 if the rectified supply voltage V_(Φ) _(—) _(R) is 110V or 220V to allow the dimmer detection system to select respective thresholds and delays. The OTP bits allow entry of data into the dimmer detection system 1300. Exemplary data includes predetermined thresholds, such as the glue signal threshold time GS_(TIME) _(—) _(TH), voltage thresholds, and one or more delay times. In at least one embodiment, the OTP bits are stored in a memory (not shown), such as a register, in the dimmer detection system 1300.

The digital dimmer detection system 1300 provides the DIMMER_MODE and DDT signals to controller 604 (FIG. 6) to allow controller 604 to operate efficiently by, for example, disabling dimmer emulator 610 when no dimmer is detected or a trailing edge type dimmer is detected. The digital dimmer detection system 1300 asserts the EXPOSE_LINE signal to suspend the generation of an emulated supply voltage by dimmer emulator 610 when the digital dimmer detection system 1300 is processing data to detect an active dimmer and determine a dimmer type. In at least one embodiment, when the generation of the emulated supply voltage is suspended, controller 604 causes the power converter system 605 to boost the rectified supply voltage V_(Φ) _(—) _(R). Suspending generation of the emulated supply voltage and boosting the rectified supply voltage V_(Φ) _(—) _(R) allows the digital dimmer detection system 1300 to sample actual values of rectified supply voltage V_(Φ) _(—) _(R). Generation of an emulated supply voltage is described in detail in Dimmer Output Emulation.

FIG. 14 depicts a digital dimmer detection system 1400, which represents one embodiment of the digital dimmer detection system 1300. The digital dimmer detection system 1400 includes a state machine 1402 to control operation of the digital dimmer detection system 1400. FIG. 15 depicts an exemplary dimmer detection and dimmer detection type state diagram 1500 for positively detecting an active phase cutting dimmer 504, positively detecting a trailing edge phase cut of the rectified supply voltage V_(Φ) _(—) _(R), and implicitly detecting a leading edge phase cut of the rectified supply voltage V_(Φ) _(—) _(R). In at least one embodiment, the state machine 1402 operates in accordance with the state diagram 1500. FIG. 16 depicts exemplary signals associated with trailing edge type detection mode and correlated states of the state machine 1402 corresponding to an exemplary operation of digital dimmer detection system 1400. An exemplary operation of the digital dimmer detection system 1400 is subsequently discussed with reference to state diagram 1500 and the signals and states of FIG. 16.

Referring to FIGS. 14, 15, and 16, the digital dimmer detection system 1400 monitors the glue signal i_(GLUE) and the rectified supply voltage V_(Φ) _(—) _(R) to detect an active dimmer 504 and determine a type of dimmer 504 if dimmer 504 is actively phase cutting the rectified supply voltage V_(Φ) _(—) _(R). In at least one embodiment, the digital dimmer detection system 1400 is configured to positively detect a trailing edge phase cut because, for example, trailing edge phase cuts are generally “cleaner”, i.e. have less perturbations or other disturbances, than leading edge phase cuts when asserting the glue signal i_(GLUE). The state machine 1402 receives the glue signal i_(GLUE) and the rectified supply voltage V_(Φ) _(—) _(R).

In state 1 of state diagram 1500, the state machine 1402 is initially idle. In state 2, the state machine 1402 generates the EXPOSE_LINE signal and provides the EXPOSE_LINE signal to controller 604 (FIG. 6), and controller 604 suspends generation of an emulated supply voltage signal E_(S) (FIG. 6). Suspending the emulated supply voltage signal E_(S) allows the digital dimmer detection system 1400 to monitor the actual rectified supply voltage V_(Φ) _(—) _(R). In at least one embodiment, dimmer detector 1404 is identical to dimmer detector 802 (FIG. 8) and detects dimmer 504 if the glue signal i_(GLUE) exceeds a predetermined time threshold T_(TH) _(—) _(GLUE) (FIG. 8).

The dimmer detection signal DIMMER_MODE indicates the presence or absence of dimmer 504 in accordance with the states specified in Table 2. In at least one embodiment, the time threshold T_(TH) _(—) _(GLUE) is stored in a register 1406. In at least one embodiment, the value of time threshold T_(TH) _(—) _(GLUE) is optionally (indicated by a dashed line) entered into the register 1406 via the OTP BITS. In at least one embodiment, the state machine 1500 proceeds to state 3 regardless of whether a dimmer is detected in state 2.

In at least one embodiment, deassertion of glue signal i_(GLUE) can cause temporary fluctuations (such as the fluctuations 1204 (FIG. 12) of the rectified supply voltage V_(Φ) _(—) _(R). Thus, in state 3, state machine 1402 delays detection of the dimmer type by dimmer type detector 1408 until the fluctuations sufficiently settle to allow detection of a type of dimmer 504 (FIG. 6) by dimmer type detector 1408. The particular duration of delay in state 3 is a matter of design choice and depends on anticipated duration of the fluctuations of the rectified supply voltage V_(Φ) _(—) _(R). In at least one embodiment, the delay in state 3 exceeds the anticipated duration of fluctuations of the rectified supply voltage V_(Φ) _(—) _(R) while allowing the dimmer type detector 1408 sufficient opportunity to detect a type of dimmer 504 for a minimum phase cut angle, such as 10°.

During state 4, the dimmer type detector 1408 monitors the rectified supply voltage V_(Φ) _(—) _(R) and, in at least one embodiment, continuously determines a slope of the rectified supply voltage V_(Φ) _(—) _(R). In at least one embodiment, the slope of rectified supply voltage V_(Φ) _(—) _(R) is determined by comparing a difference ΔV between two consecutive sampled values of the rectified supply voltage V_(Φ) _(—) _(R) during a fixed period of time ΔT with a voltage difference threshold value ΔV_TH. Thus, the dimmer type detector 1408 determines ΔV/ΔT, which represents the slope the rectified supply voltage V_(Φ) _(—) _(R). For example, a voltage difference ΔV greater than the voltage difference threshold value ΔV_TH indicates a first type of dimmer, such as a leading edge dimmer when analyzing a leading edge of the rectified supply voltage V_(Φ) _(—) _(R). For example, a voltage difference ΔV less than the voltage difference threshold value ΔV_TH indicates a second type of dimmer, such as a trailing edge dimmer, when analyzing a leading edge of the rectified supply voltage V_(Φ) _(—) _(R) or indicates no dimmer.

In at least one embodiment, the slope of the rectified supply voltage V_(Φ) _(—) _(R) is determined by determining an amount of time ΔT_(ELAPSED) that elapses between reaching a first threshold voltage (such as rectified supply voltage V_(Φ) _(—) _(R) _(—) _(TH1) (FIG. 11) and a second threshold voltage (such as rectified supply voltage V_(Φ) _(—) _(R) _(—) _(TH2) (FIG. 11). If the elapsed time ΔT_(ELAPSED) is less than a predetermined threshold time T_(TH), then dimmer detector 1408 determines the ΔV/ΔT, which also represents the slope of the rectified supply voltage V_(Φ) _(—) _(R). In at least one embodiment, the values of V_(Φ) _(—) _(R) _(—) _(TH1), V_(Φ) _(—) _(R) _(—) _(TH2), and ΔT_(ELAPSED) are stored in the dimmer detection system 1300 (FIG. 13) using OTP bits.

The state machine 1402 enters state 5 and waits for the next assertion of the glue signal i_(GLUE) while the dimmer type detector 1408 continues to determine the slope of rectified supply voltage V_(Φ) _(—) _(R). When the glue signal is asserted, the state machine 1402 moves to state 6. In state 6, the state machine 1402 measures the duration of the glue signal. A duration of glue signal less than a predetermined threshold of time indicates that no dimmer is present. When the glue signal i_(GLUE) is deasserted, the state machine 1402 enters state 7 and causes the dimmer type detector 1408 to determine a type of detector 504 and generate a dimmer type signal DT indicating the determined dimmer type. In at least one embodiment, if at any time in state 4 the dimmer type detector 1408 determines that ΔV is greater than ΔV_TH, dimmer type detector 1408 generates the dimmer type signal DT to indicate that dimmer 504 is a trailing edge type dimmer.

If during state 4 the dimmer type detector 1408 does not determine that ΔV is greater than the threshold voltage difference ΔV_TH, then dimmer type detector 1408 generates the dimmer type signal DT to indicate that dimmer 504 is a leading edge type dimmer. In at least one embodiment, a dimmer type signal DT of logical 1 indicates a trailing edge type dimmer, and a dimmer type signal DT of logical 0 indicates a leading edge type dimmer. In at least one embodiment, the threshold voltage difference ΔV_TH is stored in a register 1410. In at least one embodiment, the value of threshold voltage difference ΔV_TH is optionally (indicated by a dashed line) entered into the register 1410 via the OTP BITS.

In at least one embodiment, digital dimmer detection system 1400 includes an optional dimmer type validator 1412 to validate the dimmer type determination by dimmer type detector 1408. In at least one embodiment, the dimmer type validator 1412 is included in digital dimmer detection system 1400 to increase the probability of an accurate determination of a dimmer type of dimmer 504. In at least one embodiment, the dimmer 504 does not always reliably and cleanly phase cut each cycle of the rectified supply voltage V_(Φ) _(—) _(R). For example, the rectified supply voltage V_(Φ) _(—) _(R) is not always a clean (i.e. undisturbed other than a phase cut) signal, and occasionally the dimmer 504 can skip a phase cut of the rectified supply voltage V_(Φ) _(—) _(R) when the dimmer 504 should be phase cutting the rectified supply voltage V_(Φ) _(—) _(R).

In at least one embodiment, the dimmer type validator 1412 validates a dimmer type if the dimmer type signal DT indicates the same type of dimmer X consecutive times in a row. “X” represents the number of times, and, in at least one embodiment, the value of “X” is entered into a memory (not shown) of digital dimmer detection system 1400 as one of the OTP values. In at least one embodiment, the value of “X” is chosen between 1 and 4. The dimmer type validator 1412 generates the detected dimmer type signal DDT representing a validated dimmer type and provides the detected dimmer type signal DDT for controller 604 (FIG. 6).

Although digital dimmer detection system 1400 has been described as positively detecting a trailing edge type dimmer, the digital dimmer detection system 1400 can be modified to detect a leading edge type dimmer by, for example, determining the slope ΔV/ΔT of the rectified supply voltage V_(Φ) _(—) _(R) directly after deassertion of the glue signal i_(GLUE) and determining if the change in the rectified supply voltage V_(Φ) _(—) _(R) indicates an abrupt change in the rectified supply voltage V_(Φ) _(—) _(R) corresponding to a phase cut.

FIG. 17 depicts dimmer type detector 1700, which represents one embodiment of dimmer type detector 1408. The dimmer type detector 1700 includes a ΔV in Δt measurement module 1701 to measure a change rectified supply voltage V_(Φ) _(—) _(R) over a change in time for detection of an abrupt change in rectified supply voltage V_(Φ) _(—) _(R). An analog-to-digital converter (ADC) 1702 receives the analog rectified supply voltage V_(Φ) _(—) _(R) and converts the rectified supply voltage V_(Φ) _(—) _(R) into a digital voltage signal V_(Φ) _(—) _(R)(n), where “n” is a sample index number. Low pass filter 1704 filters the digital voltage signal V_(Φ) _(—) _(R)(n) to generate a filtered rectified supply voltage V_(Φ) _(—) _(R) _(—) _(FILT)(n). In at least one embodiment, the low pass filter has a 3 dB cut off frequency of 3 kHz. Downsampler 1706 downsamples the filtered, rectified supply voltage V_(Φ) _(—) _(R) _(—) _(FILT)(n) from, for example, 1 MHz (f_(S0)) to between 10 kHz and 50 kHz (f_(S1)) to generate the filtered, rectified supply voltage V_(Φ) _(—) _(R) _(—) _(FILT)(n/N), where “1/N” represents the frequency downsampling fraction f_(S0)/f_(S1). The particular value of frequency f_(s1) is programmable using the OTP bits (FIG. 13). Delay z⁻¹ delays V_(Φ) _(—) _(R) _(—) _(FILT)(n/N) by one sample to generate V_(Φ) _(—) _(R) _(—) _(FILT)((n−1)/N). Adder 1710 adds V_(Φ) _(—) _(R) _(—) _(FILT)(n/N) to −V_(Φ) _(—) _(R) _(—) _(FILT)((n−1/N) to generate a voltage difference sample ΔV between the two consecutive sampled values of the rectified supply voltage V_(Φ) _(—) _(R). Comparator 1712 compares the voltage difference sample ΔV with a threshold voltage difference ΔV_TH and generates dimmer type signal DT based on the outcome of the comparison.

If the voltage difference sample ΔV is greater than the threshold voltage difference ΔV_TH, the rectified supply voltage V_(Φ) _(—) _(R) has an abrupt change at a trailing edge of rectified supply voltage V_(Φ) _(—) _(R). An abrupt change in the trailing edge of rectified supply voltage V_(Φ) _(—) _(R) indicates a presence of a trailing edge dimmer. In at least one embodiment, the noninverting terminal of comparator 1712 receives the voltage difference signal ΔV, and the inverting terminal receives the threshold voltage difference ΔV_TH. Accordingly, in this embodiment, when the dimmer type signal DT output of comparator 1712 is a logical 1, the logical 1 indicates a trailing edge type dimmer. Conversely, a dimmer type signal DT of logical 0 indicates a leading edge type dimmer or no dimmer. The dimmer type detector 1700 is depicted functionally and can be implemented using analog, digital, or mixed analog and digital circuitry.

FIG. 18 depicts dimmer type validator 1800, which represents one embodiment of dimmer type validator 1412. The dimmer type validator 1800 validates the type of dimmer by confirming that the dimmer type signal DT(n) indicates the same type of dimmer at least “M” times in a row. “n” is an index. The value of “M” is programmable and is, for example, set by an OTP bits (FIG. 13) to specify the value of the multiplexer select signal OTP_SELECT. A first delay element 1802, represented by the z-domain nomenclature Z⁻¹, receives the dimmer type signal DT. The first delay element 1802 is connected in series with three other delay elements 1804, 1806, and 1808. Each delay element 1802-1808 is updated once per cycle of dimmer type validator 1800. A dimmer type signal DT(n−1) of the first delay element 1802 is the value of the immediately preceding dimmer type signal, a dimmer type signal DT(n−2) of the second delay element 1804 represents the value of the dimmer type signal two cycles ago, and so on. Thus, dimmer type signals DT(n−1), DT(n−2), DT(n−3), and DT(n−4) represent 4 consecutive values of the dimmer type signal DT.

A 4×1 multiplexer 1809 receives the dimmer type signal DT(n−1) as the first dimmer type signal DDT₀. The remaining dimmer type signals DDT₁, DDT₂, and DDT₃ are the respective output signals of logic AND gates 1810, 1812, and 1814. The output DDT₁ of AND gate 1810 is a logical 1 only if both dimmer type signals DT(n−1) and DT(n−2) are the same, and, thus, represent the same dimmer type. The output DDT₂ of AND gate 1812 is a logical 1 only if all three dimmer type signals DT(n−1), DT(n−2), and DT(n−3) are the same. The output DDT₃ of AND gate 1814 is a logical 1 only if all four dimmer type signals DT(n−1), DT(n−2), DT(n−3), and DT(n−4) are the same. The value of OTP_SELECT multiplexer output select signal determines which dimmer type signal of multiplexer 1809 is latched by latch 1816. For validation requiring 2 consecutive, uniform determinations of the dimmer type, the OTP_SELECT signal is set to 2. For validation requiring 3 consecutive, uniform determinations of the dimmer type, the OTP_SELECT multiplexer output select signal is set to 3, and so on. In at least one embodiment, the OTP_SELECT multiplexer output select signal is set to 4 so that DDT_(i) equals DDT₃. Latch 1816 stores the value of DDT_(i) and provides the value of DDT_(i) as the dimmer detection type signal DDT in FIG. 14.

FIG. 19 depicts dimmer type detector 1900, which represents another embodiment of dimmer type detector 1408. The ΔV in Δt measurement module 1701 determines the voltage difference sample ΔV as described with reference to FIG. 17. Following the ΔV in Δt measurement module 1701 is a low pass filter 1902, which low pass filters the voltage difference sample ΔV. In at least one embodiment, the 3 dB corner frequency is greater than 1/(2·ΔT_(OPER)), and ΔT_(OPER) is an operating frequency of dimmer type detector 1900. The low pass filter 1902 has a 3 dB corner frequency that effectively removes transient voltages from rectified supply voltage V_(Φ) _(—) _(R). Since such transient voltages generally have a frequency significantly greater than the nominal frequency (e.g. 220 Hz or 440 Hz) of rectified supply voltage V_(Φ) _(—) _(R), the low pass filter 1902 performs an effective validation of the dimmer by filtering out transient voltages that might alter a dimmer type determination.

The low pass filter provides a digital output signal ΔV_(LPF), which is the low pass filtered version of the voltage difference sample ΔV from ΔV in Δt measurement module 1701. Comparator 1712 compares the digital output signal ΔV_(LPF) with a threshold voltage difference ΔV_TH and generates dimmer type signal DT based on the outcome of the comparison in the same manner as the comparison of the voltage difference sample ΔV with the threshold voltage difference ΔV_TH described in conjunction with FIG. 17. Latch 1904 stores the dimmer type signal DDT. The latch 1904 represents one embodiment of a latch that can be used to store the dimmer type signal DDT. Any latch, such as a D flip-flop can also be used.

Thus, in at least one embodiment, a lighting system includes a dimmer detection system. In at least one embodiment, the dimmer detection system detects a presence of a dimmer and identifies the type of dimmer.

Although embodiments have been described in detail, it should be understood that various changes, substitutions, and alterations can be made hereto without departing from the spirit and scope of the invention as defined by the appended claims. 

What is claimed is:
 1. A method comprising: receiving an input signal representing a supply voltage signal; detecting a dimmer affecting the supply voltage signal; and generating a dimmer detection signal representing detection of the dimmer; wherein detecting a dimmer affecting the supply voltage comprises: generating a glue signal when the input signal is below a minimum threshold value; and determining when a duration of the glue signal indicates that the dimmer is affecting the supply voltage signal.
 2. The method of claim 1 wherein the dimmer is a triac-based dimmer, and the glue signal is a current that prevents a triac of the triac-based dimmer from repeatedly engaging and disengaging during a single half cycle of the supply voltage signal.
 3. The method of claim 2 further comprising: determining a type of the dimmer affecting the supply voltage; and generating a dimmer type detection signal.
 4. The method of claim 3 wherein determining a type of the dimmer affecting the supply voltage comprises: comparing the input signal with a first threshold value; comparing the input signal with a second threshold value; determining an amount of time between when the input signal reaches the first threshold value and the input signal reaches the second threshold value; comparing the determined amount of time with a time threshold value; and indicating that the dimmer is a first type of dimmer if the determined time is above the time threshold value and indicating the dimmer is a second type of dimmer if the determined time is below the time threshold value.
 5. The method of claim 3 wherein determining a type of the dimmer affecting the supply voltage comprises: determining a voltage difference in the input signal that occurs during a fixed amount of time; comparing the voltage difference in the input signal to a voltage difference threshold value; and indicating that the dimmer is a first type of dimmer if the voltage difference is greater than the voltage difference threshold value and indicating the dimmer is a second type of dimmer if the voltage difference is greater than the voltage difference threshold value.
 6. The method of claim 3 further comprising: determining if the determined type of dimmer is consistent over multiple cycles of the supply voltage signal to validate the type of the dimmer.
 7. The method of claim 1 wherein: determining when a duration of the glue signal indicates that the dimmer is affecting the supply voltage signal comprises: receiving an assertion of the glue signal at an input of a timer; generating with the timer a timer output signal representing a determination of a duration of the assertion of the glue signal at the input of the timer; providing the timer output signal and a time threshold signal to respective inputs of a comparator; comparing the timer output signal to the time threshold signal; and determining that the dimmer is affecting the supply voltage signal when a value of the timer output signal exceeds a value of the time threshold signal; and generating a dimmer detection signal representing detection of the dimmer comprises: changing a state of an output of the comparator when a value of the timer output signal exceeds a value of the time threshold signal.
 8. The method of claim 1 wherein the supply voltage signal comprises a rectified line input voltage to a switching power converter.
 9. An apparatus comprising: a dimmer detection system configured to: receive an input signal representing a supply voltage signal; detect a dimmer affecting the supply voltage signal; and generate a dimmer detection signal representing detection of the dimmer; wherein to detect a dimmer affecting the supply voltage, the dimmer detection system is configured to: generate a glue signal when the input signal is below a minimum threshold value; and determine when a duration of the glue signal indicates that the dimmer is affecting the supply voltage signal.
 10. The apparatus of claim 9 wherein the dimmer is a triac-based dimmer, and the glue signal is a current that prevents a triac of the triac-based dimmer from repeatedly engaging and disengaging during a single half cycle of the supply voltage signal.
 11. The apparatus of claim 10 wherein the dimmer detection system is further configured to: determine a type of the dimmer affecting the supply voltage; and generate a dimmer type detection signal.
 12. The apparatus of claim 11 wherein to determine the type of the dimmer affecting the supply voltage, the dimmer detection system comprises: one or more first comparators to compare the input signal with a first threshold value and compare the input signal with a second threshold value; a counter, coupled to the one or more first comparators, to determine an amount of time between when the input signal reaches the first threshold value and the input signal reaches the second threshold value; a second comparator, coupled to the counter, to compare the determined amount of time with a time threshold value and provide an output that indicates that the dimmer is a first type of dimmer if the determined time is above the time threshold value and indicating the dimmer is a second type of dimmer if the determined time is below the time threshold value.
 13. The apparatus of claim 11 wherein to determine the type of the dimmer affecting the supply voltage, the dimmer detection system comprises: a dimmer type detector to determine a voltage difference in the input signal that occurs during a fixed amount of time; a comparator, coupled to the dimmer type detector, to compare the voltage difference in the input signal to a voltage difference threshold value; and wherein the dimmer type detector is further configured to generate a dimmer type output signal that indicates that the dimmer is a first type of dimmer if the voltage difference is greater than the voltage difference threshold value and indicating the dimmer is a second type of dimmer if the voltage difference is greater than the voltage difference threshold value.
 14. The apparatus of claim 13 wherein the dimmer detection system further comprises: a validator, coupled to the dimmer type detector, to receive the dimmer type output signal and determine if the determined type of dimmer is consistent over multiple cycles of the supply voltage signal to validate the type of the dimmer.
 15. The apparatus of claim 9 wherein to determine when a duration of the glue signal indicates that the dimmer is affecting the supply voltage signal, the dimmer detection system comprises: a timer having an input to receive an assertion of the glue signal and circuitry to generate a timer output signal representing a determination of a duration of the assertion of the glue signal at the input of the timer; and a comparator, coupled to the timer, having respective inputs to receive the timer output signal and a time threshold signal and to compare the timer output signal to the time threshold signal, change a state of an output signal of the comparator when a value of the timer output signal exceeds a value of the time threshold signal, wherein the change of state of the output signal indicates a determination that the dimmer is affecting the supply voltage signal.
 16. The apparatus of claim 9 wherein the supply voltage signal comprises a rectified line input voltage to a switching power converter.
 17. The apparatus of claim 9 wherein the dimmer detection system comprises analog and digital signal processors.
 18. An apparatus comprising: a switching power converter; and a controller, coupled to the switching power converter, wherein the controller is configured to control power conversation by the switching power converter and the controller includes a dimmer detection system, the dimmer detection system is configured to: receive an input signal representing a supply voltage signal; detect a dimmer affecting the supply voltage signal; and generate a dimmer detection signal representing detection of the dimmer; wherein to detect a dimmer affecting the supply voltage, the dimmer detection system is configured to: generate a glue signal when the input signal is below a minimum threshold value; and determine when a duration of the glue signal indicates that the dimmer is affecting the supply voltage signal.
 19. The apparatus of claim 18 wherein the dimmer detection system is further configured to: determine a type of the dimmer affecting the supply voltage; and generate a dimmer type detection signal.
 20. The apparatus of claim 19 wherein to determine a type of the dimmer affecting the supply voltage, the dimmer detection system is capable to perform at least one of (A) and (B): (A) compare the input signal with a first threshold value; compare the input signal with a second threshold value; determine a time between when the input signal reaches the first threshold value and the input signal reaches the second threshold value; compare the determined time with a time threshold value; and indicate that the dimmer is a first type of dimmer if the determined time is above the time threshold value and indicating the dimmer is a second type of dimmer if the determined time is below the time threshold value; (B) compare the input signal with a first threshold value; determine a voltage difference in the input signal that occurs during a fixed amount of time; compare the voltage difference in the input signal to a voltage difference threshold value; and indicate that the dimmer is a first type of dimmer if the voltage difference is greater than the voltage difference threshold value and indicating the dimmer is a second type of dimmer if the voltage difference is greater than the voltage difference threshold value. 